export default {
    router: {
        // 路由激活类型
        linkActiveClass: 'active',
        extendRoutes(routes, resolve) {

            // 数组清空   
            routes.splice(0)
            routes.push(...[
                {

                    path: '/',
                    component: resolve(__dirname, 'layout/index.vue'),
                    children: [
                        {
                            path: '',
                            component: resolve(__dirname, 'pages/home/index.vue'),
                            name: 'home'
                        },
                        {
                            path: 'login',
                            component: resolve(__dirname, 'pages/login/index.vue'),
                            name: 'login'
                        },
                        {
                            path: 'register',
                            component: resolve(__dirname, 'pages/login/index.vue'),
                            name: 'register'
                        },
                        {
                            path: 'profile/:username',
                            component: resolve(__dirname, 'pages/profile/index.vue'),
                            name: 'profile'
                        },
                        {
                            path: 'settings',
                            component: resolve(__dirname, 'pages/settings/index.vue'),
                            name: 'settings'
                        },
                        {
                            path: 'editor',
                            component: resolve(__dirname, 'pages/editor/index.vue'),
                            name: 'editor'
                        },
                        {
                            path: 'article/:slug',
                            component: resolve(__dirname, 'pages/article/index.vue'),
                            name: 'article'
                        }
                    ]

                }
            ])
        }
    }
}